{include file="../application/admin/view/admin/header.html" /}
		<div class="nav_z clearfix">
			<div id="box" class="nav_nav">
				<ul>
			       <li class="kebi trr tdd"><a href="{:url('admin/Index/index')}">教师工作量</a></li>
			       <li class="tdd"><a href="{:url('admin/Admin/index')}">领导统计表</a></li>
			    </ul>
				<ul class="gdd">
					<li class="rdd edd"><span class="glyphicon glyphicon-home"></span>首页</li>
					<li class="edd ti"><a href="{:url('admin/Admin/index')}"><span class="glyphicon glyphicon-list-alt"></span>学期管理</a></li>
					<li class="xuanz edd ti"><a id="add" href="{:url('admin/Admin/banji')}"><span class="glyphicon glyphicon-list-alt"></span>班级管理</a></li>
					<li class="edd ti"><a href="{:url('admin/Admin/kecheng')}"><span class="glyphicon glyphicon-list-alt"></span>课程管理</a></li>
					<li class="edd ti"><a href="{:url('admin/Admin/yohu')}"><span class="glyphicon glyphicon-list-alt"></span>用户管理</a></li>
					<li id="wei" class="edd ti toji"><a href="#"><span class="glyphicon glyphicon-list-alt"></span>教师统计表</a></li>
					<li class="jiao">
                        <ul>
					       <li><a href="{:url('admin/Admin/winning')}">获奖统计</a></li>
					       <li><a href="{:url('admin/Admin/training')}">实训统计</a></li>
					       <li><a href="{:url('admin/Admin/sk')}">授课统计</a></li>
					       <li><a href="{:url('admin/Admin/research')}">科研项目统计</a></li>
					       <li><a href="{:url('admin/Admin/paper')}">论文发表统计</a></li>
					       <li><a href="{:url('admin/Admin/train')}">培训(出差)统计</a></li>
					    </ul>
					</li>
					<li class="edd ti"><a href="{:url('admin/Admin/toji')}"><span class="glyphicon glyphicon-list-alt"></span>总体统计表</a></li>
				</ul>
			</div>
		</div>
		<!-- 领导表格 -->
		<div class="nav_z_cont">
			<!-- 班级管理表格 -->
			<div class="yi">
				    <form action="" class="xzxueqi">
						<select>
						  <option value="xz">选择学期</option>
						  <option value="nn">2016-2017-1</option>
						  <option value="opel">2016-2017-2</option>
						  <option value="audi">2017-2018-1</option>
						  <option value="audi">2017-2018-2</option>
						</select>
					</form>
					<table>
						<tr class="tr1">
							<td colspan="1" style="text-align: left;">班级管理</td>
							<td colspan="2" style="text-align: right;">
								<button id="xinz"><span class="glyphicon glyphicon-plus"></span>新增</button>
							</td>
						</tr>
						<tr>
							<td>班级</td>
							<td>人数</td>
							<td>操作</td>
						</tr>
						{volist name="classesList" id="vo" empty="$empty"}
							<tr>
								<td>{$vo['class_name']}</td>
								<td>{$vo['class_nub']}</td>
								<td class="caoz">
									<button type="button" class="btn bianji bianj" onclick="class_v({$vo['id']})">编辑</button>
									<button type="button" class="btn shanchu" onclick='if(confirm("确定删除？")){window.location="{:url('admin/Admin/class_del',['id'=> $vo['id']])}"}'>删除</button>
								</td>
							</tr>
						{/volist}
					</table>
					<div class="page">
						{$page}
					</div>
			</div>
		</div>
		<!-- 新增窗口 -->
		<div class="box">
		　	<span class="closeBtn glyphicon glyphicon-remove" title="关闭"></span>
			<h2><span class="glyphicon glyphicon-tag"></span>新增班级</h2>
			<form action="{:url('admin/Admin/class_add')}" method="post">
				<p>班级:<input type="text" name="class_name" placeholder="请输入班级名称"></p>
				<p>人数:<input type="text" name="class_nub" placeholder="请输入人数"></p>
				<p><button type="submit">保存</button><button type="reset">重置</button></p>
			</form>
		</div>
		<!-- 编辑窗口 -->
		<div class="bjbox">
		　	<span class="closeBtn glyphicon glyphicon-remove" title="关闭"></span>
			<h2><span class="glyphicon glyphicon-tag"></span>编辑班级</h2>
			<form action="{:url('admin/Admin/class_edit')}" method="post">
				<input type="hidden" name="id" id="id">
				<p>班级:<input type="text" name="class_name" id="class_name"></p>
				<p>人数:<input type="text" name="class_nub" id="class_nub"></p>
				<p><button type="submit">保存</button><button type="reset">重置</button></p>
			</form>
		</div>

	</div>
</body>
<script>
//班级数据传到编辑框
	function class_v(id){
		var url = "{:url('admin/Admin/class_v')}";
		$.get(url,{id:id},
			function(data){
				$('#id').val(data.id);
				$('#class_name').val(data.class_name);
				$('#class_nub').val(data.class_nub);
			}
		);
	}
</script>
</html>